



<!doctype html>
<html lang="en" class="no-js">
  <head>

<style>
  h1, h2, h3 { color: #04A9F4; }
  pre { color: black !important; }
</style>


      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width,initial-scale=1">
      <meta http-equiv="x-ua-compatible" content="ie=edge">

        <meta name="description" content="Open source package for Survival Analysis modeling">


        <link rel="canonical" href="https://www.pysurvival.io/models/parametric_theory.html">


        <meta name="author" content="The PySurvival Team">


        <meta name="lang:clipboard.copy" content="Copy to clipboard">

        <meta name="lang:clipboard.copied" content="Copied to clipboard">

        <meta name="lang:search.language" content="en">

        <meta name="lang:search.pipeline.stopwords" content="True">

        <meta name="lang:search.pipeline.trimmer" content="True">

        <meta name="lang:search.result.none" content="No matching documents">

        <meta name="lang:search.result.one" content="1 matching document">

        <meta name="lang:search.result.other" content="# matching documents">

        <meta name="lang:search.tokenizer" content="[\s\-]+">

      <link rel="shortcut icon" href="../images/favicon.ico">
      <meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.0.2">



        <title>Theory - PySurvival</title>



      <link rel="stylesheet" href="../assets/stylesheets/application.982221ab.css">

        <link rel="stylesheet" href="../assets/stylesheets/application-palette.224b79ff.css">




        <meta name="theme-color" content="#2196f3">



      <script src="../assets/javascripts/modernizr.1f0bcf2b.js"></script>



        <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=:300,400,400i,700|">
        <style>body,input{font-family:"","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"","Courier New",Courier,monospace}</style>


    <link rel="stylesheet" href="../assets/fonts/material-icons.css">






  </head>



    <body dir="ltr" data-md-color-primary="blue" data-md-color-accent="purple">

    <svg class="md-svg">
      <defs>


          <svg xmlns="http://www.w3.org/2000/svg" width="416" height="448"
    viewBox="0 0 416 448" id="__github">
  <path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19-18.125
        8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19 18.125-8.5
        18.125 8.5 10.75 19 3.125 20.5zM320 304q0 10-3.125 20.5t-10.75
        19-18.125 8.5-18.125-8.5-10.75-19-3.125-20.5 3.125-20.5 10.75-19
        18.125-8.5 18.125 8.5 10.75 19 3.125 20.5zM360
        304q0-30-17.25-51t-46.75-21q-10.25 0-48.75 5.25-17.75 2.75-39.25
        2.75t-39.25-2.75q-38-5.25-48.75-5.25-29.5 0-46.75 21t-17.25 51q0 22 8
        38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0
        37.25-1.75t35-7.375 30.5-15 20.25-25.75 8-38.375zM416 260q0 51.75-15.25
        82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5-41.75
        1.125q-19.5 0-35.5-0.75t-36.875-3.125-38.125-7.5-34.25-12.875-30.25-20.25-21.5-28.75q-15.5-30.75-15.5-82.75
        0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25
        30.875q36.75-8.75 77.25-8.75 37 0 70 8 26.25-20.5
        46.75-30.25t47.25-9.75q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34
        99.5z" />
</svg>

      </defs>
    </svg>
    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
    <label class="md-overlay" data-md-component="overlay" for="__drawer"></label>

      <a href="#parametric-models" tabindex="1" class="md-skip">
        Skip to content
      </a>


      <header class="md-header" data-md-component="header">
  <nav class="md-header-nav md-grid">
    <div class="md-flex">
      <div class="md-flex__cell md-flex__cell--shrink">
        <a href="https://www.pysurvival.io/" title="PySurvival" class="md-header-nav__button md-logo">

            <img src="../images/logo.ico" width="24" height="24">

        </a>
      </div>
      <div class="md-flex__cell md-flex__cell--shrink">
        <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
      </div>
      <div class="md-flex__cell md-flex__cell--stretch">
        <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">

            <span class="md-header-nav__topic">
              PySurvival
            </span>
            <span class="md-header-nav__topic">
              Theory
            </span>

        </div>
      </div>

              <!-- Global site tag (gtag.js) - Google Analytics -->
              <script async src="https://www.googletagmanager.com/gtag/js?id=UA-136790579-1"></script>
              <script>
                window.dataLayer = window.dataLayer || [];
                function gtag(){dataLayer.push(arguments);}
                gtag('js', new Date());

                gtag('config', 'UA-136790579-1');
              </script>

      <div class="md-flex__cell md-flex__cell--shrink">

          <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>

<div class="md-search" data-md-component="search" role="dialog">
  <label class="md-search__overlay" for="__search"></label>
  <div class="md-search__inner" role="search">
    <form class="md-search__form" name="search">
      <input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
      <label class="md-icon md-search__icon" for="__search"></label>
      <button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
        &#xE5CD;
      </button>
    </form>
    <div class="md-search__output">
      <div class="md-search__scrollwrap" data-md-scrollfix>
        <div class="md-search-result" data-md-component="result">
          <div class="md-search-result__meta">
            Type to start searching
          </div>
          <ol class="md-search-result__list"></ol>
        </div>
      </div>
    </div>
  </div>
</div>

      </div>

        <div class="md-flex__cell md-flex__cell--shrink">
          <div class="md-header-nav__source">





<a href="https://github.com/square/pysurvival/" title="Go to repository" class="md-source" >

    <div class="md-source__icon">
      <svg viewBox="0 0 24 24" width="24" height="24">
        <use xlink:href="#__github" width="24" height="24"></use>
      </svg>
    </div>

  <div class="md-source__repository">
    square/pysurvival
  </div>
</a>
          </div>
        </div>

    </div>
  </nav>
</header>

    <div class="md-container">




      <main class="md-main">
        <div class="md-main__inner md-grid" data-md-component="container">


              <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    <nav class="md-nav md-nav--primary" data-md-level="0">
  <label class="md-nav__title md-nav__title--site" for="__drawer">
    <a href="https://www.pysurvival.io/" title="PySurvival" class="md-nav__button md-logo">

        <img src="../images/logo.ico" width="48" height="48">

    </a>
    PySurvival
  </label>

    <div class="md-nav__source">





<a href="https://github.com/square/pysurvival/" title="Go to repository" class="md-source" >

    <div class="md-source__icon">
      <svg viewBox="0 0 24 24" width="24" height="24">
        <use xlink:href="#__github" width="24" height="24"></use>
      </svg>
    </div>

  <div class="md-source__repository">
    square/pysurvival
  </div>
</a>
    </div>

  <ul class="md-nav__list" data-md-scrollfix>






  <li class="md-nav__item">
    <a href="../index.html" title="Home" class="md-nav__link">
      Home
    </a>
  </li>







  <li class="md-nav__item">
    <a href="../installation.html" title="Installation" class="md-nav__link">
      Installation
    </a>
  </li>







  <li class="md-nav__item">
    <a href="../intro.html" title="Introduction to Survival Analysis" class="md-nav__link">
      Introduction to Survival Analysis
    </a>
  </li>







  <li class="md-nav__item">
    <a href="../math.html" title="The math of Survival Analysis" class="md-nav__link">
      The math of Survival Analysis
    </a>
  </li>







  <li class="md-nav__item md-nav__item--nested">

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">

    <label class="md-nav__link" for="nav-5">
      Tutorials
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
      <label class="md-nav__title" for="nav-5">
        Tutorials
      </label>
      <ul class="md-nav__list" data-md-scrollfix>







  <li class="md-nav__item">
    <a href="../tutorials/churn.html" title="Churn Prediction" class="md-nav__link">
      Churn Prediction
    </a>
  </li>







  <li class="md-nav__item">
    <a href="../tutorials/credit_risk.html" title="Credit Risk" class="md-nav__link">
      Credit Risk
    </a>
  </li>







  <li class="md-nav__item">
    <a href="../tutorials/employee_retention.html" title="Employee Retention" class="md-nav__link">
      Employee Retention
    </a>
  </li>







  <li class="md-nav__item">
    <a href="../tutorials/maintenance.html" title="Predictive Maintenance" class="md-nav__link">
      Predictive Maintenance
    </a>
  </li>


      </ul>
    </nav>
  </li>









  <li class="md-nav__item md-nav__item--active md-nav__item--nested">

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6" type="checkbox" id="nav-6" checked>

    <label class="md-nav__link" for="nav-6">
      Models
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
      <label class="md-nav__title" for="nav-6">
        Models
      </label>
      <ul class="md-nav__list" data-md-scrollfix>







  <li class="md-nav__item md-nav__item--nested">

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6-1" type="checkbox" id="nav-6-1">

    <label class="md-nav__link" for="nav-6-1">
      Cox Proportional Hazard
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="2">
      <label class="md-nav__title" for="nav-6-1">
        Cox Proportional Hazard
      </label>
      <ul class="md-nav__list" data-md-scrollfix>







  <li class="md-nav__item">
    <a href="coxph.html" title="Standard CoxPH  (API)" class="md-nav__link">
      Standard CoxPH  (API)
    </a>
  </li>







  <li class="md-nav__item">
    <a href="nonlinear_coxph.html" title="DeepSurv/Nonlinear CoxPH (API)" class="md-nav__link">
      DeepSurv/Nonlinear CoxPH (API)
    </a>
  </li>







  <li class="md-nav__item">
    <a href="semi_parametric.html" title="Theory" class="md-nav__link">
      Theory
    </a>
  </li>


      </ul>
    </nav>
  </li>







  <li class="md-nav__item md-nav__item--nested">

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6-2" type="checkbox" id="nav-6-2">

    <label class="md-nav__link" for="nav-6-2">
      Multi-Task Logistic Regression (MTLR)
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="2">
      <label class="md-nav__title" for="nav-6-2">
        Multi-Task Logistic Regression (MTLR)
      </label>
      <ul class="md-nav__list" data-md-scrollfix>







  <li class="md-nav__item">
    <a href="linear_mtlr.html" title="Linear MTLR (API)" class="md-nav__link">
      Linear MTLR (API)
    </a>
  </li>







  <li class="md-nav__item">
    <a href="neural_mtlr.html" title="Neural MTLR (API)" class="md-nav__link">
      Neural MTLR (API)
    </a>
  </li>







  <li class="md-nav__item">
    <a href="mtlr_theory.html" title="Theory" class="md-nav__link">
      Theory
    </a>
  </li>


      </ul>
    </nav>
  </li>







  <li class="md-nav__item md-nav__item--nested">

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6-3" type="checkbox" id="nav-6-3">

    <label class="md-nav__link" for="nav-6-3">
      Non-Parametric
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="2">
      <label class="md-nav__title" for="nav-6-3">
        Non-Parametric
      </label>
      <ul class="md-nav__list" data-md-scrollfix>







  <li class="md-nav__item">
    <a href="kaplan_meier.html" title="Kaplan Meier (API)" class="md-nav__link">
      Kaplan Meier (API)
    </a>
  </li>







  <li class="md-nav__item">
    <a href="smooth_kaplan_meier.html" title="Smoothed Kaplan Meier (API)" class="md-nav__link">
      Smoothed Kaplan Meier (API)
    </a>
  </li>







  <li class="md-nav__item">
    <a href="non_parametric.html" title="Theory" class="md-nav__link">
      Theory
    </a>
  </li>


      </ul>
    </nav>
  </li>









  <li class="md-nav__item md-nav__item--active md-nav__item--nested">

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6-4" type="checkbox" id="nav-6-4" checked>

    <label class="md-nav__link" for="nav-6-4">
      Parametric
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="2">
      <label class="md-nav__title" for="nav-6-4">
        Parametric
      </label>
      <ul class="md-nav__list" data-md-scrollfix>







  <li class="md-nav__item">
    <a href="parametric.html" title="Parametric models (API)" class="md-nav__link">
      Parametric models (API)
    </a>
  </li>









  <li class="md-nav__item md-nav__item--active">

    <input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">




      <label class="md-nav__link md-nav__link--active" for="__toc">
        Theory
      </label>

    <a href="parametric_theory.html" title="Theory" class="md-nav__link md-nav__link--active">
      Theory
    </a>


<nav class="md-nav md-nav--secondary">





    <label class="md-nav__title" for="__toc">Table of contents</label>
    <ul class="md-nav__list" data-md-scrollfix>

        <li class="md-nav__item">
  <a href="#introduction" title="Introduction" class="md-nav__link">
    Introduction
  </a>

</li>

        <li class="md-nav__item">
  <a href="#models" title="Models" class="md-nav__link">
    Models
  </a>

    <nav class="md-nav">
      <ul class="md-nav__list">

          <li class="md-nav__item">
  <a href="#exponential" title="Exponential" class="md-nav__link">
    Exponential
  </a>

</li>

          <li class="md-nav__item">
  <a href="#weibull" title="Weibull" class="md-nav__link">
    Weibull
  </a>

</li>

          <li class="md-nav__item">
  <a href="#gompertz" title="Gompertz" class="md-nav__link">
    Gompertz
  </a>

</li>

          <li class="md-nav__item">
  <a href="#log-logistic" title="Log-Logistic" class="md-nav__link">
    Log-Logistic
  </a>

</li>

          <li class="md-nav__item">
  <a href="#log-normal" title="Log-Normal" class="md-nav__link">
    Log-Normal
  </a>

</li>

      </ul>
    </nav>

</li>

        <li class="md-nav__item">
  <a href="#building-and-selecting-models" title="Building and selecting models" class="md-nav__link">
    Building and selecting models
  </a>

    <nav class="md-nav">
      <ul class="md-nav__list">

          <li class="md-nav__item">
  <a href="#likelihood" title="Likelihood" class="md-nav__link">
    Likelihood
  </a>

</li>

          <li class="md-nav__item">
  <a href="#selecting-the-best-model" title="Selecting the best model" class="md-nav__link">
    Selecting the best model
  </a>

</li>

      </ul>
    </nav>

</li>

        <li class="md-nav__item">
  <a href="#references" title="References" class="md-nav__link">
    References
  </a>

</li>





    </ul>

</nav>

  </li>


      </ul>
    </nav>
  </li>







  <li class="md-nav__item md-nav__item--nested">

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6-5" type="checkbox" id="nav-6-5">

    <label class="md-nav__link" for="nav-6-5">
      Simulation
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="2">
      <label class="md-nav__title" for="nav-6-5">
        Simulation
      </label>
      <ul class="md-nav__list" data-md-scrollfix>







  <li class="md-nav__item">
    <a href="simulations.html" title="Simulation models (API)" class="md-nav__link">
      Simulation models (API)
    </a>
  </li>







  <li class="md-nav__item">
    <a href="simulations_theory.html" title="Theory" class="md-nav__link">
      Theory
    </a>
  </li>


      </ul>
    </nav>
  </li>







  <li class="md-nav__item md-nav__item--nested">

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6-6" type="checkbox" id="nav-6-6">

    <label class="md-nav__link" for="nav-6-6">
      Survival Forest
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="2">
      <label class="md-nav__title" for="nav-6-6">
        Survival Forest
      </label>
      <ul class="md-nav__list" data-md-scrollfix>







  <li class="md-nav__item">
    <a href="conditional_survival_forest.html" title="Conditional Survival Forest (API)" class="md-nav__link">
      Conditional Survival Forest (API)
    </a>
  </li>







  <li class="md-nav__item">
    <a href="extra_survival_trees.html" title="Extra Survival Trees (API)" class="md-nav__link">
      Extra Survival Trees (API)
    </a>
  </li>







  <li class="md-nav__item">
    <a href="random_survival_forest.html" title="Random Survival Forest (API)" class="md-nav__link">
      Random Survival Forest (API)
    </a>
  </li>







  <li class="md-nav__item">
    <a href="survival_forest.html" title="Theory" class="md-nav__link">
      Theory
    </a>
  </li>


      </ul>
    </nav>
  </li>







  <li class="md-nav__item md-nav__item--nested">

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6-7" type="checkbox" id="nav-6-7">

    <label class="md-nav__link" for="nav-6-7">
      Survival SVM
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="2">
      <label class="md-nav__title" for="nav-6-7">
        Survival SVM
      </label>
      <ul class="md-nav__list" data-md-scrollfix>







  <li class="md-nav__item">
    <a href="linear_svm.html" title="Linear Survival SVM (API)" class="md-nav__link">
      Linear Survival SVM (API)
    </a>
  </li>







  <li class="md-nav__item">
    <a href="kernel_svm.html" title="Kernel Survival SVM (API)" class="md-nav__link">
      Kernel Survival SVM (API)
    </a>
  </li>







  <li class="md-nav__item">
    <a href="survival_svm.html" title="Theory" class="md-nav__link">
      Theory
    </a>
  </li>


      </ul>
    </nav>
  </li>


      </ul>
    </nav>
  </li>







  <li class="md-nav__item md-nav__item--nested">

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-7" type="checkbox" id="nav-7">

    <label class="md-nav__link" for="nav-7">
      Performance metrics
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
      <label class="md-nav__title" for="nav-7">
        Performance metrics
      </label>
      <ul class="md-nav__list" data-md-scrollfix>







  <li class="md-nav__item">
    <a href="../metrics/c_index.html" title="C-index" class="md-nav__link">
      C-index
    </a>
  </li>







  <li class="md-nav__item">
    <a href="../metrics/brier_score.html" title="Brier Score" class="md-nav__link">
      Brier Score
    </a>
  </li>


      </ul>
    </nav>
  </li>







  <li class="md-nav__item md-nav__item--nested">

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-8" type="checkbox" id="nav-8">

    <label class="md-nav__link" for="nav-8">
      Miscellaneous
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
      <label class="md-nav__title" for="nav-8">
        Miscellaneous
      </label>
      <ul class="md-nav__list" data-md-scrollfix>







  <li class="md-nav__item">
    <a href="../miscellaneous/activation_functions.html" title="Activation Functions" class="md-nav__link">
      Activation Functions
    </a>
  </li>







  <li class="md-nav__item">
    <a href="../miscellaneous/save_load.html" title="Saving/Loading models" class="md-nav__link">
      Saving/Loading models
    </a>
  </li>







  <li class="md-nav__item">
    <a href="../miscellaneous/tips.html" title="Tips for fitting models" class="md-nav__link">
      Tips for fitting models
    </a>
  </li>


      </ul>
    </nav>
  </li>


  </ul>
</nav>
                  </div>
                </div>
              </div>


              <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">

<nav class="md-nav md-nav--secondary">





    <label class="md-nav__title" for="__toc">Table of contents</label>
    <ul class="md-nav__list" data-md-scrollfix>

        <li class="md-nav__item">
  <a href="#introduction" title="Introduction" class="md-nav__link">
    Introduction
  </a>

</li>

        <li class="md-nav__item">
  <a href="#models" title="Models" class="md-nav__link">
    Models
  </a>

    <nav class="md-nav">
      <ul class="md-nav__list">

          <li class="md-nav__item">
  <a href="#exponential" title="Exponential" class="md-nav__link">
    Exponential
  </a>

</li>

          <li class="md-nav__item">
  <a href="#weibull" title="Weibull" class="md-nav__link">
    Weibull
  </a>

</li>

          <li class="md-nav__item">
  <a href="#gompertz" title="Gompertz" class="md-nav__link">
    Gompertz
  </a>

</li>

          <li class="md-nav__item">
  <a href="#log-logistic" title="Log-Logistic" class="md-nav__link">
    Log-Logistic
  </a>

</li>

          <li class="md-nav__item">
  <a href="#log-normal" title="Log-Normal" class="md-nav__link">
    Log-Normal
  </a>

</li>

      </ul>
    </nav>

</li>

        <li class="md-nav__item">
  <a href="#building-and-selecting-models" title="Building and selecting models" class="md-nav__link">
    Building and selecting models
  </a>

    <nav class="md-nav">
      <ul class="md-nav__list">

          <li class="md-nav__item">
  <a href="#likelihood" title="Likelihood" class="md-nav__link">
    Likelihood
  </a>

</li>

          <li class="md-nav__item">
  <a href="#selecting-the-best-model" title="Selecting the best model" class="md-nav__link">
    Selecting the best model
  </a>

</li>

      </ul>
    </nav>

</li>

        <li class="md-nav__item">
  <a href="#references" title="References" class="md-nav__link">
    References
  </a>

</li>





    </ul>

</nav>
                  </div>
                </div>
              </div>


          <div class="md-content">
            <article class="md-content__inner md-typeset">


                  <a href="https://github.com/square/pysurvival/edit/master/docs/models/parametric_theory.md" title="Edit this page" class="md-icon md-content__icon">&#xE3C9;</a>


                <!-- # Parametric models-->

<style>
  h1, h2, h3, h4 { color: #04A9F4; }
</style>

<h1 id="parametric-models">Parametric models</h1>
<h2 id="introduction">Introduction</h2>
<p>We've seen that <a href="semi_parametric.html">with Semi-Parametric models</a> the time component of the hazard function is left unspecified. In case the hazard function or the Survival function are known to follow or closely approximate a known distribution, it is better to use <strong>Parametric models</strong>.</p>
<p>Unlike Semi-Parametric models, Parametric models are better suited for forecasting and will return smooth functions of <script type="math/tex">h(t, x)</script> or <script type="math/tex">S(t, x)</script>. The most common parametric models are:</p>
<ul>
<li>Exponential</li>
<li>Weibull</li>
<li>Gompertz</li>
<li>Log-Logistic</li>
<li>Lognormal</li>
</ul>
<hr />
<h2 id="models">Models</h2>
<h3 id="exponential">Exponential</h3>
<p>The exponential distribution is the simplest and most important distribution in survival studies. Being independent of prior information, it is known as a "lack of memory" distribution requiring that the present age of the living organism does not influence its future survival.
In this model, the hazard rate is constant over time such as:
<script type="math/tex; mode=display">\begin{equation*}
\begin{split}
\lambda    & = \alpha  e^{ \vec{ x_i} \cdot \vec{ \omega} }\\
h(t, x_i)  & =  \lambda  \\
S(t, x_i)  & =  e^{- \lambda \cdot t} \\
\end{split}
\end{equation*}</script>
with <script type="math/tex">\alpha</script> and <script type="math/tex">\vec{\omega}</script> the coefficients to find.</p>
<p></b></p>
<h3 id="weibull">Weibull</h3>
<p>The Weibull distribution is a generalized form of the exponential distribution and is de facto more flexible than the exponential model.
<script type="math/tex; mode=display">\begin{equation*}
\begin{split}
\lambda    & = \alpha  e^{ \vec{ x_i} \cdot \vec{ \omega} }\\
h(t, x_i)  & =  \lambda \beta (\lambda t)^{\beta-1} \\
S(t, x_i)  & =  e^{- (\lambda t)^\beta} \\
\end{split}
\end{equation*}</script>
with <script type="math/tex">\alpha</script>, <script type="math/tex">\beta</script> and <script type="math/tex">\vec{\omega}</script> the coefficients to find.</p>
<p></b></p>
<h3 id="gompertz">Gompertz</h3>
<p>The Gompertz distribution is a continuous probability distribution, that has an exponentially increasing failure rate, and is often applied to analyze survival data.
<script type="math/tex; mode=display">\begin{equation*}
\begin{split}
\lambda    & = \alpha  e^{ \vec{ x_i} \cdot \vec{ \omega} }\\
h(t, x_i)  & = \lambda e^{\beta t} \\
S(t, x_i)  & = e^{-\frac{\lambda}{\beta }(e^{\beta t}-1)}   \\
\end{split}
\end{equation*}</script>
with <script type="math/tex">\alpha</script>, <script type="math/tex">\beta</script> and <script type="math/tex">\vec{\omega}</script> the coefficients to find.</p>
<p></b></p>
<h3 id="log-logistic">Log-Logistic</h3>
<p>As the name suggests, the log-logistic distribution is the distribution of a variable whose logarithm has the logistic distribution.
<script type="math/tex; mode=display">\begin{equation*}
\begin{split}
\lambda    & = \alpha  e^{ \vec{ x_i} \cdot \vec{ \omega} }\\
h(t, x_i)  & = \frac{\beta\lambda^\beta t^{\beta-1}}{1+(\lambda t)^\beta} \\
S(t, x_i)  & = \frac{1}{1+(\lambda t)^\beta}   \\
\end{split}
\end{equation*}</script>
with <script type="math/tex">\alpha</script>, <script type="math/tex">\beta</script> and <script type="math/tex">\vec{\omega}</script> the coefficients to find.</p>
<p></b></p>
<h3 id="log-normal">Log-Normal</h3>
<p>The lognormal distribution is used to model continuous random quantities when the distribution is believed to be skewed, such as lifetime variables
<script type="math/tex; mode=display">\begin{equation*}
\begin{split}
\lambda    & = \alpha  e^{ \vec{ x_i} \cdot \vec{ \omega} }\\
h(t, x_i)  & =  \frac{\frac{1}{t \beta \sqrt{2\pi}} \exp \left( -\left[ \frac{\log(t) - \log(\lambda)}{\beta \sqrt{2}} \right]^2 \right)}{1 - \Phi \left( \frac{\log(t) - \log(\lambda) }{\beta}\right)}       \\
S(t, x_i)  & = 1 - \Phi \left( \frac{\log(t) - \log(\lambda) }{\beta}\right)  \\
\end{split}
\end{equation*}</script>
with <script type="math/tex">\alpha</script>, <script type="math/tex">\beta</script> and <script type="math/tex">\vec{\omega}</script> the coefficients to find; <script type="math/tex">\Phi</script> is the standard normal cdf.</p>
<p></b>
</b></p>
<hr />
<h2 id="building-and-selecting-models">Building and selecting models</h2>
<h3 id="likelihood">Likelihood</h3>
<p>All the parametric models will be fitted using the maximum likelihood estimation (MLE). Regardless of the model used, the likelihood is the product over all of the observations such that:
<script type="math/tex; mode=display">\begin{equation*}
\begin{split}
L  & =  \prod_{i=1}^{N} f(T_i, x_i)^{\delta_i} S(T_i, x_i)^{1-\delta_i} \\
   & =  \prod_{i=1}^{N} h(T_i, x_i)^{\delta_i} S(T_i, x_i) \\
\end{split}
\end{equation*}</script>
</p>
<h3 id="selecting-the-best-model">Selecting the best model</h3>
<p>To select the best model, we might use the Akaike’s Information Criterion (AIC) to distinguish between different parametric models. Typically, we will pick the model whose log-likelihood is the smallest. Akaike’s
method penalizes each model’s log likelihood, <script type="math/tex">\log(L)</script>, to reflect the number of parameters that are being estimated and then compares them:
<script type="math/tex; mode=display">\begin{equation*}
AIC = −2 \log(L) + 2*\text{num_coefficients}
\end{equation*}</script>
</p>
<hr />
<h2 id="references">References</h2>
<ul>
<li><a href="https://data.princeton.edu/pop509/ParametricSurvival.pdf">Princeton Lecture - Parametric Survival Models</a></li>
<li><a href="http://www.math.ucsd.edu/~rxu/math284/slect4.pdf">UCSD Lecture - Parametric Survival Models</a></li>
<li><a href="http://www.randomservices.org/random/special/LogLogistic.html">The Log-Logistic Distribution</a></li>
<li><a href="http://www.randomservices.org/random/special/LogNormal.html">The Log-Normal Distribution</a></li>
</ul>









            </article>
          </div>
        </div>
      </main>


<footer class="md-footer">

  <div class="md-footer-meta md-typeset">
    <div class="md-footer-meta__inner md-grid">
      <div class="md-footer-copyright">

          <div class="md-footer-copyright__highlight">
            Copyright &copy; 2019 Square Inc.
          </div>



        brought to you by
        <a href="https://squareup.com/us">
        <img src="images/Square_logo.png" alt="Square Logo" title="Square Logo" width=20%, height=20% align="center"  /></a>


      </div>

  <div class="md-footer-social">
    <link rel="stylesheet" href="../assets/fonts/font-awesome.css">

      <a href="https://pysurvival.io/" class="md-footer-social__link fa fa-home"></a>

      <a href="https://github.com/square/pysurvival" class="md-footer-social__link fa fa-github"></a>

  </div>

    </div>
  </div>
</footer>

    </div>

      <script src="../assets/javascripts/application.d9aa80ab.js"></script>

      <script>app.initialize({version:"1.0.4",url:{base:".."}})</script>

        <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>

        <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML"></script>

        <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>

        <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js"></script>

        <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.bundle.min.js"></script>

        <script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-annotation/0.5.7/chartjs-plugin-annotation.js"></script>

        <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js"></script>

        <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>


  </body>
</html>
